﻿<%@ Page Language="C#" AutoEventWireup="true"  MasterPageFile="~/MasterPage.master" CodeFile="FlujoFondos.aspx.cs" Inherits="Informes_FlujoFondos" %>
<%@ Register Src="../UserControls/Fecha.ascx" TagName="Fecha" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1"  ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="text-align: center; vertical-align: text-top;">
        <asp:ScriptManager id="ScriptManager1" runat="server">
        </asp:ScriptManager>
        
<table class="tablaForm" style=" width: 100%; text-align:left">
    <tr>
        <td colspan="4" class="tdInfo" align="right">
            Operaciones: Egresos e Ingresos</td>
            </tr>
    <tr>
        <td align="left" class="tdForm" colspan="4" style="text-align: center">
            <asp:Label id="lblAccion" runat="server" Text="lblAccion" CssClass="lblAccion"></asp:Label>
        </td>
    </tr>
    <tr>
        <td colspan="4">
            <table class="tablaForm" style="width:100%">
                <tr>
                    <td style="width:33%; text-align:center">
                        <asp:RadioButton ID="rdbEgresos" runat="server" AutoPostBack="True" OnCheckedChanged="rdbEgresos_CheckedChanged" Text="Egresos" /></td>
                    <td style="width:34%; text-align:center">
                        <asp:RadioButton ID="rdbIngresos" runat="server" AutoPostBack="True" OnCheckedChanged="rdbIngresos_CheckedChanged" Text="Ingresos" /></td>
                    <td style="width:33%; text-align:center">
                        <asp:RadioButton ID="rdbBalance" runat="server" AutoPostBack="True" OnCheckedChanged="rdbBalance_CheckedChanged" Text="Balance" /></td>
                </tr>
            </table>
        </td>
    </tr>
     <tr id="trFechas" runat="server">
        <td class="tdLiteral" style="width: 25%; text-align: right">
            Fecha Desde:</td>
        <td class="tdForm" style="width: 25%; text-align: left">
            <uc1:fecha id="FechaD" runat="server"></uc1:fecha>
        </td>
        <td class="tdLiteral" style="width: 25%; text-align: right">
            Fecha Hasta:</td>
        <td class="tdForm" style="width: 25%; text-align: left">
            <uc1:fecha id="FechaH" runat="server"></uc1:fecha>
        </td>
    </tr>
    <tr>
        <td class="tdForm" colspan="4" style="text-align: center; height: 14px">
        </td>
    </tr>
    <tr id="trIngresos" runat="server">
        <td class="tdForm" colspan="4" style="text-align: center">
            <table class="tablaForm" style="width:100%">
                <tr>
                    <td class="tdTit" colspan="4" style="text-align: center">
                        Ingresos del Per&iacute;odo</td>
                </tr>
                <tr>
                    <td colspan="4" class="tdForm" style="text-align:center">
                        <asp:GridView id="gvIngresos" runat="server" BorderWidth="1px" BackColor="White" Width="100%" OnPageIndexChanging="gvIngresos_PageIndexChanging" 
                            CellPadding="3" AllowPaging="True" AutoGenerateColumns="False" 
                            DataKeyNames="Id_Ingreso" BorderColor="#999999" BorderStyle="None" GridLines="Vertical">
                        <FooterStyle BackColor="#CCCCCC" ForeColor="Black"></FooterStyle>
                            <columns>
                                <asp:TemplateField HeaderText="Número">
                                    <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                                    <ItemTemplate>
                                        <asp:Label id="Numero" runat="server" Text='<%# Bind("Id_Ingreso") %>'></asp:Label> 
                                    </ItemTemplate>
                                    </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Concepto">
                                    <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                                    <ItemTemplate>
                                        <asp:Label id="Fecha" runat="server" Text='<%# Bind("Concepto") %>'></asp:Label> 
                                    </ItemTemplate>
                                    </asp:TemplateField>
                                <asp:TemplateField HeaderText="Id Venta">
                                    <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                                    <ItemTemplate>
                                        <asp:Label id="Venta" runat="server" Text='<%# Bind("Id_Venta") %>'></asp:Label> 
                                    </ItemTemplate>
                                    </asp:TemplateField>
                                <asp:TemplateField HeaderText="Monto">
                                    <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                                    <ItemTemplate>
                                        <asp:Label id="Monto" runat="server" Text='<%# Bind("Monto", "{0:F2}") %>'></asp:Label> 
                                    </ItemTemplate>
                                    </asp:TemplateField>
                            </columns>
                            <RowStyle BackColor="#EEEEEE" ForeColor="Black" HorizontalAlign="Center"></RowStyle>
                            <EditRowStyle Wrap="True"></EditRowStyle>
                            <SelectedRowStyle BackColor="#008A8C" ForeColor="White" Font-Bold="True"></SelectedRowStyle>
                            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center"></PagerStyle>
                            <HeaderStyle BackColor="#325FB9" ForeColor="White" Font-Names="Arial Rounded MT Bold" Font-Bold="True"></HeaderStyle>
                            <AlternatingRowStyle BackColor="Gainsboro"></AlternatingRowStyle>
                        </asp:GridView>
                    </td>
                </tr>
                 <tr>
                    <td class="tdLiteral" colspan="4" style="text-align: center">
                        <asp:Label ID="Label1" runat="server" CssClass="lblAccion" Text="Total de Ingresos"></asp:Label></td>
                </tr>
                 <tr>
                    <td class="tdLiteral" colspan="4" style="text-align: center">
                        <table class="tablaForm" style="width:100%">
                            <tr>
                                <td class="tdLiteral" style="width: 25%; text-align: right">
                                    Operaciones:</td>
                                <td class="tdForm" style="width: 25%; text-align: left">
                                    &nbsp;<asp:Label ID="lblCIngresos" runat="server" Font-Bold="True"></asp:Label></td>                               
                                <td class="tdLiteral" style="width: 25%; text-align: right">
                                    Ingresos $:</td>
                                <td class="tdForm" style="width: 25%; text-align: left">
                                    &nbsp;<asp:Label ID="lblTIngresos" runat="server" Font-Bold="True"></asp:Label>&nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td class="tdForm" colspan="4" style="text-align: center; height: 14px">
        </td>
    </tr>
    <tr id="trEgresos" runat="server"> 
        <td class="tdForm" colspan="4" style="text-align: center">
            <table class="tablaForm" style="width:100%">
                <tr>
                    <td class="tdTit" colspan="4" style="text-align: center">
                        Egresos del Per&iacute;odo</td>
                </tr>
                <tr>
                    <td class="tdForm" colspan="4" style="text-align: center">
                        <asp:GridView ID="gvEgresos" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                            BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px"
                            CellPadding="3" DataKeyNames="Id_Egreso" GridLines="Vertical" OnPageIndexChanging="gvEgresos_PageIndexChanging"
                            Width="100%">
                            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                            <Columns>
                                <asp:TemplateField HeaderText="Número">
                                    <HeaderStyle ForeColor="White" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label ID="Numero" runat="server" Text='<%# Bind("Id_Egreso") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Concepto">
                                    <HeaderStyle ForeColor="White" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label ID="Concepto" runat="server" Text='<%# Bind("Concepto") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Monto">
                                    <HeaderStyle ForeColor="White" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label ID="Monto" runat="server" Text='<%# Bind("Monto", "{0:F2}") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <RowStyle BackColor="#EEEEEE" ForeColor="Black" HorizontalAlign="Center" />
                            <EditRowStyle Wrap="True" />
                            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#325FB9" Font-Bold="True" Font-Names="Arial Rounded MT Bold"
                                ForeColor="White" />
                            <AlternatingRowStyle BackColor="Gainsboro" />
                        </asp:GridView>
                    </td>
                </tr>
                 <tr>
                    <td class="tdLiteral" colspan="4" style="text-align: center">
                        <asp:Label ID="lblEgresos" runat="server" CssClass="lblAccion" Text="Total de Egresos"></asp:Label></td>
                </tr>
                 <tr>
                    <td class="tdLiteral" colspan="4" style="text-align: center">
                        <table class="tablaForm" style="width:100%">
                            <tr>
                                <td class="tdLiteral" style="width: 25%; text-align: right">
                                    Operaciones:</td>
                                <td class="tdForm" style="width: 25%; text-align: left">
                                    &nbsp;<asp:Label ID="lblCEgresos" runat="server" Font-Bold="True"></asp:Label></td>
                                <td class="tdLiteral" style="width: 25%; text-align: right">
                                    Egresos $:</td>
                                <td class="tdForm" style="width: 25%; text-align: left">
                                    &nbsp;<asp:Label ID="lblTEgresos" runat="server" Font-Bold="True"></asp:Label>&nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr runat="server">
        <td class="tdForm" colspan="4" style="text-align: center">
        </td>
    </tr>
    <tr>
        <td class="tdForm" colspan="4" style="text-align: center; height: 14px">
        </td>
    </tr>
    <tr id="trBalance" runat="server">
         <td class="tdForm" colspan="4" style="text-align: center">
            <table class="tablaForm" style="width:100%">
                <tr>
                    <td class="tdLiteral" colspan="4" style="text-align: center">
                        <asp:Label ID="lblBalance" runat="server" CssClass="lblAccion" Text="Balance:  Ingresos - Egresos"></asp:Label></td>
                </tr>
                 <tr style="width:100%">
                    <td class="tdLiteral" style="width: 25%; text-align: right">
                        Operaciones:</td>
                    <td class="tdForm" style="width: 25%; text-align: left">
                        &nbsp;<asp:Label ID="lblCantidad" runat="server" Font-Bold="True"></asp:Label></td>
                    <td class="tdLiteral" style="width: 25%; text-align: right">
                        Resultado $:</td>
                    <td class="tdForm" style="width: 25%; text-align: left">
                        <asp:Label ID="lblTotal" runat="server" Font-Bold="True"></asp:Label>
                        <asp:Label ID="lblTRed" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label>
                        <asp:Label ID="lblTGreen" runat="server" Font-Bold="True" ForeColor="#00C0C0"></asp:Label>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="width: 100%" class="tdBotones" colspan="4"> &nbsp;
                <asp:Button ID="btnCancelar" runat="server" OnClick="btnCancelar_Click" Text="Cancelar" Width="70px" />
                &nbsp;&nbsp;&nbsp;
                <asp:Button ID="btnVer" runat="server" OnClick="btnVer_Click" Text="Ver" Width="70px" />
                &nbsp;
                <asp:Button ID="btnOtro" runat="server" Text="Otro Inf." Width="70px" OnClick="btnOtro_Click" /></td>
        </tr>
    </table>
    <asp:Panel ID="pnlFecha" runat="server" CssClass="tdBotones" Style="display: none"
        Width="233px">
        <div style="background-image: none; background-color: transparent; text-align: center">
            Fecha Desde NO puede ser Posterior a Fecha Hasta.<br /><p></p>
            <asp:Button ID="btnOkCero" runat="server" Text="OK" Width="64px" />
        </div>
    </asp:Panel>
    <table id="Table1" runat="server" border="0" style="width: 0px; height: 0px">
        <tr>
            <td style="width: 100px; height: 18px">
                <asp:Button ID="btnCero" runat="server" Height="0px" Text="Button" Width="0px" />
            </td>
        </tr>
    </table>
    <cc1:ModalPopupExtender ID="mpeFecha" runat="server" BackgroundCssClass="modalBackground"
        DropShadow="true" OkControlID="btnOkCero" PopupControlID="pnlFecha" TargetControlID="btnCero">
    </cc1:ModalPopupExtender>
    </div>
</asp:Content>
